//显示加载
export function showLoading(){
	uni.showLoading({
		mask:true,
	    title: '加载中'
	});
	
	setTimeout(function(){
		uni.hideLoading();
	},10000);
}


// 请求错误信息
export function showMsg(errorText,type){
	if(type == 'showModal'){
		uni.showModal({
			title: '提示',
			content: errorText,
			showCancel: false,
			success: function (res) {
				if (res.confirm) {
					console.log('用户点击确定');
				} else if (res.cancel) {
					console.log('用户点击取消');
				}
			}
		});
	}else{
		uni.showToast({
		    title: errorText || '请求失败!',
			icon: "none",
		    duration: 3000
		});
	}
	
}

// 请求信息
export function showSuccessMsg(errorText){
	uni.showToast({
	    title: errorText || '请求成功!',
	    duration: 3000
	});
}